/*
package com.cloud.tsp.controller;

import com.cloud.api.constants.StrVo;
import com.cloud.api.domain.sys.LoginUserInfo;
import com.cloud.api.domain.user.*;
import com.cloud.core.entity.base.LoginUser;
import com.cloud.core.util.R;
import com.cloud.log.annotation.Log;
import com.cloud.log.enums.BusinessType;
import com.cloud.log.enums.OperatorType;
import com.cloud.mybatis.config.LoginHolder;
import com.cloud.mybatis.domain.TableDataInfo;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.cloud.tsp.service.IUserExtendService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

*/
/**
 * <p>
 * 管理端登陆用户扩展表 前端控制器
 * </p>
 *
 * @author haohaibo
 * @since 2024-08-21
 *//*

@Tag(name = "账户管理")
@ApiSupport(order = 300)
@RestController
@RequestMapping("/user-extend")
public class UserExtendController {

    @Resource
    private IUserExtendService userExtendService;

    @Operation(summary = "新增用户(管理端)")
    @PostMapping("/insertUser")
    @Log(title = "账户管理-新增用户", businessType = BusinessType.INSERT, operatorType = OperatorType.MANAGE)
    public R insertUser(@RequestBody @Validated AddUserRequest para){
        userExtendService.insertUser(para);
        return R.ok();
    }
    @Operation(summary = "修改用户(管理)")
    @PostMapping("/updateUser")
    @Log(title = "账户管理-修改用户", businessType = BusinessType.UPDATE, operatorType = OperatorType.MANAGE)
    public R updateUser(@RequestBody @Validated UpdateUserRequest para){
        userExtendService.updateUser(para);
        return R.ok();
    }

    @Operation(summary = "查询账户列表(管理)")
    @PostMapping("/getUserList")
    @Log(title = "账户管理-查询账户列表", businessType = BusinessType.OTHER, operatorType = OperatorType.MANAGE)
    public TableDataInfo<UserResponse> getUserList(@RequestBody @Validated QueryAdminUser para){
        return userExtendService.selectUserList(para);
    }

    @Operation(summary = "查询登陆用户名(管理端)")
    @PostMapping("/getLoginUser")
    @Log(title = "账户管理-查询登陆用户名", businessType = BusinessType.OTHER, operatorType = OperatorType.MANAGE)
    public R<LoginUserInfo> selectLoginUser(){
        LoginUser loginUser = LoginHolder.getLoginUser();
        UserExtend userExtend = userExtendService.selectLoginUser(loginUser.getUid());
        return R.ok(new LoginUserInfo(userExtend.getName(),userExtend.getMobile()));
    }

    @Operation(summary = "查询个人信息(管理端)")
    @PostMapping("/getLoginUserInfo")
    @Log(title = "账户管理-查询个人信息", businessType = BusinessType.OTHER, operatorType = OperatorType.MANAGE)
    public R<UserResponse> selectLoginUserInfo(){
        return R.ok(userExtendService.selectLoginUserInfo());
    }

    @Operation(summary = "修改个人信息(管理端)")
    @PostMapping("/updateLoginUserInfo")
    @Log(title = "账户管理-修改个人信息", businessType = BusinessType.UPDATE, operatorType = OperatorType.MANAGE)
    public R updateLoginUserInfo(@RequestBody @Validated UpdateUserInfo para){
        userExtendService.updateLoginUserInfo(para);
        return R.ok();
    }

    @Operation(summary = "查询用户信息(远程)")
    @PostMapping("/selectById")
    @Log(title = "账户管理-查询用户信息(远程)", businessType = BusinessType.OTHER, operatorType = OperatorType.OTHER)
    public R<UserExtend> selectById(@RequestBody @Validated StrVo para){
        return R.ok(userExtendService.getById(para.getId()));
    }


}
*/
